try:
    num = int(input("请输入一个整数："))    # 如果输入0则异常为：division by zero；
    # 如果输入英文字母则异常为：invalid literal for int() with base 10: 'a'
    result = 8 / num
    print(f"{result}")
except Exception as e:
    print(f"捕获的异常类型有：{e}")
